Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error en imports que se hacen desde diferentes packages (el orden causa error) #306

Merged
merged 4 commits into from
Nov 19, 2024

Conversation

fdodino
Copy link
Contributor

@fdodino fdodino commented Nov 10, 2024

Sobre el problema reportado en #308, me tomó mucho laburo tratar de reproducirlo, pero acá dejo dos tests:

  • el del linker que pasa irremediablemente
  • el del interpreter, que rompe cuando vos tenés una jerarquía, cuando vos hacés
// en un package
import B.*
class A inherits B {}

// en otro package
import C.*
class B inherits C {}

// y en otro package
class C {
  method bla()
}

no funciona new B().bla() (dice que no lo entiende). Si en cambio hacés:

// en un package
import B.*
class A{}

// en otro package
import C.*
class B inherits C {}

// y en otro package
class C {
  method bla()
}

funciona perfectamente.

@ivojawer @PalumboN , me gustaría verlo en nuestras sesiones de los martes.

@fdodino fdodino changed the title reproducing error Error en imports con diferentes packages Nov 10, 2024
@fdodino fdodino changed the title Error en imports con diferentes packages Error en imports que se hacen desde diferentes packages (el orden causa error) Nov 11, 2024
@fdodino fdodino force-pushed the fix-missing-reference-imports branch from a95e3a9 to 006cbd3 Compare November 11, 2024 23:41
@fdodino
Copy link
Contributor Author

fdodino commented Nov 12, 2024

Ahi estuvimos con @ivojawer y lo resolvimos asegurando de asignar todos los scopes de packages antes de ir por los modules.

Copy link

codecov bot commented Nov 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.75%. Comparing base (8db4df1) to head (99e5cb0).
Report is 5 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #306   +/-   ##
=======================================
  Coverage   89.75%   89.75%           
=======================================
  Files          28       28           
  Lines        3171     3172    +1     
  Branches      574      574           
=======================================
+ Hits         2846     2847    +1     
  Misses        169      169           
  Partials      156      156           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@fdodino fdodino marked this pull request as ready for review November 12, 2024 23:04
@fdodino fdodino requested review from PalumboN and ivojawer November 12, 2024 23:04
Copy link
Contributor

@PalumboN PalumboN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uuuufffff magia de la buena hay acá 🪄 👃 🌟

Comment on lines +118 to +120
})

root.forEach((node, _parent) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Altoooke 😎

test/interpreter.test.ts Outdated Show resolved Hide resolved
expect(result).to.equal('"hola"')
})

it('should be able to execute sentences related to a hierarchy defined in different packages - 2', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Por qué 2? Y qué onda con mandarlos para language como sanity?

Copy link
Contributor

@PalumboN PalumboN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mejora de tests

test/linker.test.ts Outdated Show resolved Hide resolved
test/linker.test.ts Outdated Show resolved Hide resolved
@PalumboN PalumboN merged commit 1af8cf1 into master Nov 19, 2024
4 checks passed
@PalumboN PalumboN deleted the fix-missing-reference-imports branch November 19, 2024 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants